//
//  MenuCollectionViewCellModel.m
//  MKUI
//
//  Created by 苏尚进 on 2020/8/29.
//Copyright © 2020 moon. All rights reserved.
//

#import "MenuCollectionViewCellModel.h"
#import "MenuCollectionViewCell.h"

@implementation MenuCollectionViewCellModel
- (id)init{
    if (self=[super init]) {
        self.cellClass = [MenuCollectionViewCell class];
    }
    return self;
}
- (id)initWithModelObject:(Menu *)modelObject{
	if (self=[self init]) {
		self.modelObject = modelObject;
        self.modelValue = modelObject;
	}
	return self;
}
@end


@interface MenuCollectionViewCellBase ()

@end

@implementation MenuCollectionViewCellBase
- (id)initWithFrame:(CGRect)frame{
	if (self=[super initWithFrame:frame]) {
	}
	return self;
}
- (void)layoutSubviews{
	[super layoutSubviews];
	//	CGRect bounds = self.contentView.bounds;
}
- (void)setCustomCellModel:(MenuCollectionViewCellModel *)customCellModel{
	_customCellModel = customCellModel;
	//	Menu *modelObject = customCellModel.modelObject;
}
#pragma mark - protocol:MKUICollectionViewCellProtocol
MKDEF_MKUICollectionViewCellModel(MenuCollectionViewCellModel, customCellModel)
//MKDEF_SINGLETON(MenuCollectionViewCell)//动态尺寸
//+ (CGSize)sizeWithCollectionView:(UICollectionView *)collectionView collectionCellModel:(MKUICollectionViewCellModel *)collectionCellModel{
//	return [self dynamicSizeWithCollectionView:collectionView collectionCellModel:collectionCellModel cellShareInstance:[self sharedInstance] calBlock:^CGSize(UICollectionView *collectionView, MKUICollectionViewCellModel *cellModel, MenuCollectionViewCell *cell) {
//		CGSize size = CGSizeMake(44, 44);
//		return size;
//	}];
//}
+ (CGSize)sizeWithCollectionView:(UICollectionView *)collectionView collectionCellModel:(MKUICollectionViewCellModel *)collectionCellModel{//静态尺寸
	return CGSizeMake(44, 44);
}
@end
